package com.eight.cloud.admin.service;

import com.eight.cloud.admin.entity.AppEntity;
import com.eight.cloud.admin.model.dto.AppDto;
import com.eight.cloud.core.global.model.AppUser;
import com.eight.cloud.mybatisplus.service.IBaseService;
import com.eight.cloud.openfeign.admin.vo.AppVo;

/**
* app信息表 服务类
*
* @ClassName: IAppService
* @Author TXC
* @Date 2025-01-07 17:34
*/
public interface IAppService extends IBaseService<AppEntity> {

    /**
     * 创建app
     * @param app
     * @return
     */
    AppVo create(AppDto app);

    /**
     * app编辑
     * @param appDto app信息
     * @return
     */
    boolean edit(AppDto appDto);

    /**
     * 查询app详情
     * @param uuid 租户id
     * @return
     */
    AppVo detail(String uuid);

    /**
     * 通过密钥id查询
     * @param secretId
     * @return
     */
    AppUser getAppBySecretId(String secretId);

    /**
     * 通过uuid查询
     * @param appid appid
     * @return app用户信息
     */
    AppUser getAppByUuid(String appid);

    /**
     * 更新密钥
     * @param uuid 租户id
     * @return
     */
    String updateSecretKey(String uuid);

    /**
     * 生成appId
     * @return
     */
    String generateAppId();

}
